package com.dodoke.service.impl;

import java.util.List;

import com.dodoke.domain.WxGoodsAttr;
import com.dodoke.mapper.WxGoodsAttrMapper;
import com.dodoke.service.IWxGoodsAttrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 【商品参数】Service业务层处理
 * 
 * @author dodoke
 * @date 2020-08-25
 */
@Service
public class WxGoodsAttrServiceImpl implements IWxGoodsAttrService
{
    @Autowired
    private WxGoodsAttrMapper wxGoodsAttrMapper;

    /**
     * 查询【商品参数】
     *
     * @param goodsId 【商品】ID
     * @return 结果集
     */
    @Override
    public List<WxGoodsAttr> getGoodsAttrByGoodsId(Long goodsId)
    {
        return wxGoodsAttrMapper.selectWxGoodsAttrById(goodsId);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param wxGoodsAttr 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<WxGoodsAttr> selectWxGoodsAttrList(WxGoodsAttr wxGoodsAttr)
    {
        return wxGoodsAttrMapper.selectWxGoodsAttrList(wxGoodsAttr);
    }

    /**
     * 新增【商品参数】
     *
     * @param wxGoodsAttrList 【商品参数集合】
     * @return 结果
     */
    @Override
    public int insertWxGoodsAttr(List<WxGoodsAttr> wxGoodsAttrList)
    {
        return wxGoodsAttrMapper.insertWxGoodsAttr(wxGoodsAttrList);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param wxGoodsAttr 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateWxGoodsAttr(WxGoodsAttr wxGoodsAttr)
    {
        return wxGoodsAttrMapper.updateWxGoodsAttr(wxGoodsAttr);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteWxGoodsAttrByIds(Long[] ids)
    {
        return wxGoodsAttrMapper.deleteWxGoodsAttrByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param id 【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteWxGoodsAttrById(Long id)
    {
        return wxGoodsAttrMapper.deleteWxGoodsAttrById(id);
    }
}
